package com.example.consumer_order_feign_hystrix_fallback_stream.feign;

import com.netflix.hystrix.HystrixCommand;
import com.netflix.hystrix.HystrixCommandProperties;
import com.netflix.hystrix.HystrixThreadPoolProperties;
import feign.Feign;
import feign.Request;
import feign.Retryer;
import feign.Target;
import feign.hystrix.HystrixFeign;
import feign.hystrix.SetterFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.lang.reflect.Method;

@Configuration
public class FeignConfig {

    @Bean
    public Request.Options options(){
        return new Request.Options(10000,10000);
    }

    @Bean
    public Retryer retryer(){
        return Retryer.NEVER_RETRY;
    }


//    @Bean
//    public HystrixThreadPoolProperties.Setter hystrixThreadPoolProperties(){
//        return HystrixThreadPoolProperties.Setter().withCoreSize(30);
//    }
}
